bitkeeper revision 1.1205.1.10 (421796afi6cb40DRRlGAd0wByIfSjg)
authormaf46@burn.cl.cam.ac.uk <maf46@burn.cl.cam.ac.uk>
Sat, 19 Feb 2005 19:42:39 +0000 (19:42 +0000)
committermaf46@burn.cl.cam.ac.uk <maf46@burn.cl.cam.ac.uk>
Sat, 19 Feb 2005 19:42:39 +0000 (19:42 +0000)
Bug fix: stop leaking shadow L2 pages like a sieve.
We were looking up shadow_status with a mfn rather than a gpfn.

xen/include/asm-x86/shadow.h

index 25b0287b7be8087083778936fd5024b36f595fc6..d1f88f77d80c6b41146c803c7521b01f19724d7f 100644 (file)
@@ -730,10 +730,8 @@ static inline void __update_pagetables(struct exec_domain *ed)
 {
     struct domain *d = ed->domain;
     unsigned long gmfn = pagetable_val(ed->arch.guest_table) >> PAGE_SHIFT;
-
-    // mafetter: BUG: __shadow_status() should take a gpfn, not a gmfn...
-    // WHY DOES THIS WORK?
-    unsigned long smfn = __shadow_status(d, gmfn) & PSH_pfn_mask;
+    unsigned long gpfn = __mfn_to_gpfn(d, gmfn);
+    unsigned long smfn = __shadow_status(d, gpfn) & PSH_pfn_mask;
 
     SH_VVLOG("0: __update_pagetables(gmfn=%p, smfn=%p)", gmfn, smfn);